package com.woniuxy.cloud.carl.marketing.client;


import com.woniuxy.cloud.carl.marketing.client.param.AddScoreMallParam;
import com.woniuxy.cloud.carl.marketing.client.param.ExchangeGoodsParam;
import com.woniuxy.cloud.carl.marketing.client.result.ScoreLogDto;
import com.woniuxy.cloud.carl.marketing.client.result.ScoreMallGoodsDto;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 积分商城表 前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2023-07-19
 */

@FeignClient(contextId = "scoreMallClient",name = "marketing")
public interface ScoreMallClient {
    @PostMapping("/addScoreMall")
    Result addScoreMall(@RequestBody AddScoreMallParam param);

    @DeleteMapping("/delScoreMall")
    Result delScoreMall(@RequestParam("scoreMallGoodsId") Long scoreMallGoodsId);

    @PostMapping("/exchangeGoods")
    Result exchangeGoods(@RequestBody ExchangeGoodsParam param);

    @GetMapping("/getScoreMall")
    Result<ScoreMallGoodsDto> getScoreMall();

    @GetMapping("/getMyScoreLog")
    Result<List<ScoreLogDto>> getMyScoreLog(@RequestParam("userId")Long userId);
}

